import 'package:flutter/material.dart';
import 'font/MyIcon.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: false,
        primarySwatch: Colors.yellow,
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text("Flutter App")),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return const Column(
      children: [
        SizedBox(height: 20),
        //指定系统图标
        Icon(Icons.home, size: 40, color: Colors.red),
        SizedBox(height: 20),
        Icon(Icons.search, size: 40, color: Colors.red),
        SizedBox(height: 20),
        //使用自定义组件
        Icon(MyIcon.wx, size: 40, color: Colors.green),
        SizedBox(height: 20),
        Icon(MyIcon.zfb, size: 40, color: Colors.blue)
      ],
    );
  }
}
